Fix docstring typos across codebase#8688
Conversation
Fixes the following typos in documentation/comments: Networks: - Fix "nEfficient" to "an Efficient" in downsample.py, upsample.py, utils.py - Fix "utilty" to "utility" in utils.py - Fix "vaue" to "value" in utils.py Losses: - Fix "simmily" to "similarly" in unified_focal_loss.py (3 occurrences) - Fix "represenation" to "representation" in nacl_loss.py - Add missing f-string prefix in image_dissimilarity.py error message Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
📝 WalkthroughWalkthroughThis PR corrects documentation and a minor string interpolation issue across six files. Changes include fixing typos in docstrings ("nEfficient" → "Efficient", "represenation" → "representation", "utilty" → "utility", "vaue" → "value"), updating a paper title reference, and fixing string interpolation in an error message to display the actual Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (1)**/*.py⚙️ CodeRabbit configuration file
Files:
🪛 Ruff (0.14.10)monai/losses/image_dissimilarity.py226-226: Avoid specifying long messages outside the exception class (TRY003) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
🔇 Additional comments (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The AffineTransform class was using inconsistent align_corners values: - to_norm_affine was hardcoded to use align_corners=False - affine_grid and grid_sample were using self.align_corners (default=True) This mismatch caused a half-pixel offset between coordinate systems, leading to incorrect spatial transformations. Changes: - Pass self.align_corners to to_norm_affine for consistent behavior - Update test expected values to reflect corrected behavior - Add test cases for align_corners consistency verification Fixes Project-MONAI#8688
The AffineTransform class was using inconsistent align_corners values: - to_norm_affine was hardcoded to use align_corners=False - affine_grid and grid_sample were using self.align_corners (default=True) This mismatch caused a half-pixel offset between coordinate systems, leading to incorrect spatial transformations. Changes: - Pass self.align_corners to to_norm_affine for consistent behavior - Update test expected values to reflect corrected behavior - Add test cases for align_corners consistency verification Fixes Project-MONAI#8688 Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
Summary
I was doing reviews with AI code reviewers and it caught some docstring typos.
Test plan
unified_focal_loss.pytests pass (4 passed)nacl_loss.pytests pass (7 passed)num_binsvalueNote: These are all non-breaking docstring/comment fixes only.